package com.horay.springbootdemo.caffeine.redis.index.service.impl;

import com.horay.springbootdemo.caffeine.redis.index.service.IndexService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

/**
 * 首页信息业务实现类
 *
 * @author heyingcheng
 * @date 2019/9/30 16:14
 */
@Slf4j
@CacheConfig(cacheNames = "SPRING-BOOT-DEMO")
@Service
public class IndexServiceImpl implements IndexService {

    @Cacheable(key = "'IndexInfo'")
    @Override
    public String getIndexInfo() {
        log.info("com.horay.springbootdemo.caffeine.redis.index.service.impl.IndexServiceImpl.getIndexInfo");
        return "com.horay.springbootdemo.caffeine.redis.index.service.impl.IndexServiceImpl.getIndexInfo";
    }

}
